package xjtu.se.articlecommunity.buser.articlemanage.impl;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import xjtu.se.articlecommunity.buser.articlemanage.ArticleManageService;
import xjtu.se.articlecommunity.buser.articlemanage.dao.ArticleManageDao;
import xjtu.se.articlecommunity.buser.articlemanage.dto.articleDto;
import xjtu.se.articlecommunity.buser.articlemanage.dto.at_tabDto;
import xjtu.se.articlecommunity.buser.articlemanage.dto.onlyTabDto;
import xjtu.se.articlecommunity.buser.articlemanage.dto.tabDto;

import javax.annotation.Resource;
import java.util.List;
@Service
@Transactional
public class ArticleManageServiceImpl implements ArticleManageService {
    @Resource
    private ArticleManageDao articleManageDao;
    @Override
    public List<articleDto> findAllArticle(articleDto dto) {

        return articleManageDao.findAll(dto);
    }

    @Override
    public List<tabDto> findTab(tabDto dto) {
        return articleManageDao.findTab(dto);
    }

    @Override
    public boolean checkarticle(articleDto dto) {
        return articleManageDao.checkarticle(dto);
    }

    @Override
    public boolean deleteTab(at_tabDto dto) {
        return articleManageDao.deleteTab(dto);
    }

    @Override
    public boolean changeTab(onlyTabDto dto) {
        return articleManageDao.changeTab(dto);
    }

    @Override
    public boolean deletearticle(articleDto dto) {
        return articleManageDao.deleteArticle(dto);
    }

    @Override
    public List<articleDto> getListByID(articleDto dto) {
        return articleManageDao.getListByID(dto);
    }

    @Override
    public List<articleDto> getListByTitle(articleDto dto) {
        return articleManageDao.getListByName(dto);
    }

    @Override
    public List<articleDto> getListByStatus(articleDto dto) {
        return articleManageDao.getListByStatus(dto);
    }

    @Override
    public List<articleDto> findContent(articleDto dto) {
        return articleManageDao.findContent(dto);
    }

    @Override
    public List<articleDto> findTitle(articleDto dto) {
        return articleManageDao.findTitle(dto);
    }


}
